# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=chromaprint
pkgver=1.5.1
pkgrel=2
pkgdesc="C library for generating audio fingerprints used by AcoustID"
url="https://acoustid.org/chromaprint"
arch="all"
license="MIT"
makedepends="cmake fftw-dev ffmpeg-dev samurai"
options="!check"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/acoustid/chromaprint/archive/v$pkgver.tar.gz
	ffmpeg5.patch
	"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DBUILD_TOOLS=ON .
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
ea16e4d2b879c15b1d9b9ec93878da8b893f1834c70942663e1d2d106c2e0a661094fe2dd3bae7a6c2a1f9d5d8fab5e0b0ba493561090cf57b2228606fad1e66  chromaprint-1.5.1.tar.gz
a45ee894ce5c9227d79f77f644076b4cf7528bc74e9d4ce5382a5ef77d39922130bfce26805ca3101d2de182ecb4702918cebf55b4476ae7496f370ba23d94c4  ffmpeg5.patch
"
